﻿CREATE TABLE [dbo].[HealthKnowledgeArticle] (
    [Id]          INT            IDENTITY (1, 1) NOT NULL,
    [Title]       NVARCHAR (200) NULL,
    [Content]     NTEXT          NULL,
    [Issuer]      NVARCHAR (50)  NULL,
    [IssueDt]     DATETIME       NULL,
    [ContentType] INT            NOT NULL,
    [BookId]      INT            NOT NULL,
    [DirId]       INT            NULL,
    [Sort]        INT            NULL,
    [RecStatus]   INT            NOT NULL,
    [RecCreateDt] DATETIME       NOT NULL,
    [RecUpdateDt] DATETIME       NULL,
    [RecDeleteDt] DATETIME       NULL,
    PRIMARY KEY CLUSTERED ([Id] ASC)
);


GO
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'健康教育知识文章表', @level0type = N'SCHEMA', @level0name = N'dbo', @level1type = N'TABLE', @level1name = N'HealthKnowledgeArticle';


GO
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'主键，自增长', @level0type = N'SCHEMA', @level0name = N'dbo', @level1type = N'TABLE', @level1name = N'HealthKnowledgeArticle', @level2type = N'COLUMN', @level2name = N'Id';


GO
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'文章标题', @level0type = N'SCHEMA', @level0name = N'dbo', @level1type = N'TABLE', @level1name = N'HealthKnowledgeArticle', @level2type = N'COLUMN', @level2name = N'Title';


GO
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'文章内容', @level0type = N'SCHEMA', @level0name = N'dbo', @level1type = N'TABLE', @level1name = N'HealthKnowledgeArticle', @level2type = N'COLUMN', @level2name = N'Content';


GO
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'发布人', @level0type = N'SCHEMA', @level0name = N'dbo', @level1type = N'TABLE', @level1name = N'HealthKnowledgeArticle', @level2type = N'COLUMN', @level2name = N'Issuer';


GO
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'发布时间', @level0type = N'SCHEMA', @level0name = N'dbo', @level1type = N'TABLE', @level1name = N'HealthKnowledgeArticle', @level2type = N'COLUMN', @level2name = N'IssueDt';


GO
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'内容格式； 1：纯文本；2：html文本', @level0type = N'SCHEMA', @level0name = N'dbo', @level1type = N'TABLE', @level1name = N'HealthKnowledgeArticle', @level2type = N'COLUMN', @level2name = N'ContentType';


GO
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'所属书籍列表', @level0type = N'SCHEMA', @level0name = N'dbo', @level1type = N'TABLE', @level1name = N'HealthKnowledgeArticle', @level2type = N'COLUMN', @level2name = N'BookId';


GO
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'所属目录Id', @level0type = N'SCHEMA', @level0name = N'dbo', @level1type = N'TABLE', @level1name = N'HealthKnowledgeArticle', @level2type = N'COLUMN', @level2name = N'DirId';


GO
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'排序', @level0type = N'SCHEMA', @level0name = N'dbo', @level1type = N'TABLE', @level1name = N'HealthKnowledgeArticle', @level2type = N'COLUMN', @level2name = N'Sort';


GO
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'记录状态, 1：正常；2：删除', @level0type = N'SCHEMA', @level0name = N'dbo', @level1type = N'TABLE', @level1name = N'HealthKnowledgeArticle', @level2type = N'COLUMN', @level2name = N'RecStatus';


GO
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'记录创建时间', @level0type = N'SCHEMA', @level0name = N'dbo', @level1type = N'TABLE', @level1name = N'HealthKnowledgeArticle', @level2type = N'COLUMN', @level2name = N'RecCreateDt';


GO
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'记录上次修改时间', @level0type = N'SCHEMA', @level0name = N'dbo', @level1type = N'TABLE', @level1name = N'HealthKnowledgeArticle', @level2type = N'COLUMN', @level2name = N'RecUpdateDt';


GO
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'记录删除时间', @level0type = N'SCHEMA', @level0name = N'dbo', @level1type = N'TABLE', @level1name = N'HealthKnowledgeArticle', @level2type = N'COLUMN', @level2name = N'RecDeleteDt';

